package com.cloud.poetry.base.feign;

import com.cloud.poetry.base.feign.fallback.ChatRoomFeignClientFallBack;
import com.cloud.poetry.core.constant.PoetryConstant;
import com.cloud.poetry.core.entity.ChatCacheUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author mengxj
 */
@FeignClient(value = "cloud-chat-server", fallbackFactory = ChatRoomFeignClientFallBack.class)
public interface ChatRoomFeignClient {

    @PostMapping(value = "chatroom/addUser", headers = {PoetryConstant.FEIGN_HEADER})
    void addUser(@RequestBody ChatCacheUser user);
}
